package com.quarters.mapper;

import com.quarters.bean.Article;
import com.quarters.bean.ArticleOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 文章和订单表 Mapper 接口
 * </p>
 *
 * @author 冯政尚
 * @since 2019-09-04
 */
public interface ArticleOrderMapper extends BaseMapper<ArticleOrder> {


    /**
     * @param map
     * @return 后台查询
     */
    List<ArticleOrder> selectMyPage(@Param("param") Map map);
    Integer  countMyPage (@Param("param")Map map);
    /**
     * @param map
     * @return 后台查询
     */
    List<ArticleOrder> selectMyPageAll(@Param("param") Map map);
    Integer  countMyPageAll (@Param("param")Map map);


    /**
     * @param userId
     * @param time
     * @return 根据当前用户今天发送多少次群发
     */
    List<ArticleOrder> selectByIdTime(@Param("userId")Long userId,@Param("time")String time);

    //根据订单号查询这条订单
    ArticleOrder selectByOrderNumber(@Param("orderNumber")String orderNumber);

    //根据订单号查询订单
    //ArticleOrder selectByOrderNumber(@Param("orderNumber")String orderNumber);

    /**
     * @param map
     * @return 查询订单
     */
    List<ArticleOrder> selectOrderAll(@Param("param") Map map);
    Integer  countOrderAll (@Param("param")Map map);


    /**
     * @param map
     * @return 查询订单
     */
    List<ArticleOrder> selectOrder(@Param("param") Map map);
    Integer  countOrder (@Param("param")Map map);

    //标签查询订单
    List<ArticleOrder> selectLableOrder(@Param("param") Map map);
    Integer  countLableOrder (@Param("param")Map map);

}
